package cn.zebra.dev.mall.module.cart.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author runnable@sina.cn
 */
@Getter
@Setter
@ToString
public class CartAddVO {

    @NotNull(message = "请选择商品!")
    @ApiModelProperty("商品id")
    private Long productId;

    @NotNull(message = "请选择商品规格!")
    @ApiModelProperty("商品规格id")
    private Long productSkuId;

    @NotNull(message = "请输入加入购物车的商品数量!")
    @ApiModelProperty("数量")
    @Min(value = 1, message = "数量不能小于1!")
    private Long num;
}
